package model;

import java.util.ArrayList;

public class Absences {
	private static Absences instance = null;
	public Object Absences_Id;

	private ArrayList<Absence> absenceList = new ArrayList<Absence>();

	protected Absences() {

	}

	public void Add(Absence absence) {
		absenceList.add(absence);
	}

	public ArrayList<Absence> GetAll() {
		return absenceList;
	}

	public int Get_Absence_Id(String Absence) {
		for (Absence a : absenceList) {
			// if (a.Absence_Id.equalsIgnoreCase(absence)){
			return a.getAbsence_Id();
		}
		// }
		return 0;
	}

	public void Change() {

	}

	public void Delete() {

	}

	public static Absences getInstance() {
		if (instance == null) {
			instance = new Absences();
		}
		return instance;
	}
}
